<template>
	<view @click="getImage" :class="[num === 1?'comUpdata':'',cssClass]">
		<view v-if="!imgSrc" :class="{'crossDownPlus':cssClass === 'crossDown'}">
		</view>
		<view v-else :style="'background-image: url('+imgSrc+')'" :class="{'crossImg':cssClass === 'crossDown'}">
		</view>
		<view v-if="!imgSrc" :class="{'crossDownText':cssClass === 'crossDown'}">
			<text>
				{{tipText}}
			</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			cssClass: String, // 样式类别
			tipText: String,
			fileType: Number, // 图片类别，如正反等1 为正， 2 为反
			num: Number,
			alreadyUpdata: Boolean
		},
		data() {
			return {
				imgSrc: '',
			};
		},
		methods: {
			getImage() {
				
			}
		},
	}
</script>

<style scoped>
	.crossDown {
		height: 189.33upx;
		width: 295upx;
		background-color: #ffc8c7;
		position: relative;
		border-radius: 15upx;
		box-shadow: 0 0 20upx -10upx #b31f1f;
	}

	.crossDownPlus {
		background-color: #fff7f5;
		margin: auto;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		width: 0;
		height: 0;
		position: absolute;
	}

	.crossDownPlus:before,
	.crossDownPlus:after {
		content: "";
		position: absolute;
		background: #fff7f5;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

	.crossDownPlus:before {
		width: 63.33upx;
		height: 15upx;
	}

	.crossDownPlus:after {
		width: 15upx;
		height: 63.33upx;
	}

	.crossDownText {
		width: 100%;
		position: absolute;
		bottom: 0;
		text-align: center;
		font-size: 20upx;
		color: #fff7f5;
		padding: 13.33upx 0;
	}

	.comUpdata {
		height: 189.33upx !important;
		width: 342upx !important;
	}
</style>
